From: Jasper St. Pierre Date: Wed, 11 Sep 2013 04:38:38 +0000 (-0400) Subject: lookingGlass: Fix newline replacing X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3456 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9ba970b83dfd0795563bf7104fe2740c246b22ec;p=gnome-shell.git lookingGlass: Fix newline replacing text.replace() returns the new string as strings in JS are immutable. --- diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 268d45f57..a408628a0 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -920,7 +920,7 @@ const LookingGlass = new Lang.Class({ let text = o.get_text(); // Ensure we don't get newlines in the command; the history file is // newline-separated. - text.replace('\n', ' '); + text = text.replace('\n', ' '); // Strip leading and trailing whitespace text = text.replace(/^\s+/g, '').replace(/\s+$/g, ''); if (text == '')